package com.woniuxy.service.impl;

import com.woniuxy.dao.PaperCategoryDao;
import com.woniuxy.dao.UserDao;
import com.woniuxy.entity.PaperCategory;
import com.woniuxy.entity.PaperItem;
import com.woniuxy.entity.ResponseEntity;
import com.woniuxy.entity.User;
import com.woniuxy.service.IPaperCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author ylr
 * @time 2022/06/02 17:26:08
 */
@Service
public class PaperCategoryServiceImpl implements IPaperCategoryService{

    @Autowired
    PaperCategoryDao paperCategoryDao;

    @Override
    public List<PaperCategory> findCategories(Map map) {
        return paperCategoryDao.findCategories(map);
    }

    @Override
    public Boolean addCategory(PaperCategory paperCategory) {
        paperCategory.setUptime(new Date());
        return paperCategoryDao.addCategory(paperCategory);
    }

    @Override
    public Boolean delCategory(Integer id) {
        return paperCategoryDao.delCategory(id);
    }

    @Override
    public List<String> findGrades() {
        return paperCategoryDao.findGrades();
    }

    @Override
    public List<PaperCategory> findCategories() {
        return paperCategoryDao.findCategory();
    }

}
